package cn.jtcoding.test2;

import cn.jtcoding.springframework.core.annotation.Autowired;
import cn.jtcoding.springframework.core.annotation.Component;
import cn.jtcoding.springframework.core.annotation.Qualifier;
import cn.jtcoding.springframework.core.annotation.Service;
import lombok.extern.slf4j.Slf4j;

@Slf4j
@Component
@Service("testService")
public class TestService {
    @Autowired
    @Qualifier("cat")
    private Animal cat;

    @Autowired
    @Qualifier("dog")
    private Animal dog;

    public void test() {
        log.info("do test");

        dog.eat();

        cat.eat();
    }
}
